Monitoring a mobile device application

ABSTRACT

The present technology allows for a mobile device operating system to be modified in order to better monitor the performance of the mobile device applications. A mobile device file, such as a dex file for android operating system, may be extracted from an APK file for an application. The mobile device file may be analyzed, and a new mobile device file may be generated in addition to the analyzed mobile device file. The modifications may include identifying methods that should be monitored during execution of the corresponding application on a mobile device. The mobile device file, may be modified at a remote server, provided back to the mobile device, and then loaded by the mobile device at a later time.

BACKGROUND OF THE INVENTION

The World Wide Web has expanded to provide web services faster to consumers. Web services may be provided by a web application which uses one or more services to handle a transaction. The applications may be distributed over several machines, making the topology of the machines that provides the service more difficult to track and monitor.

Web services provided by applications implemented in Java are easy to manipulate and instrument code in. Most mobile device operating systems, however, are not as flexible. Most mobile devices do not have much memory and resources, and therefore mobile device applications are susceptible to delays if there are too many changes or modifications made to the operating system code. Further, the operating systems and platforms of mobile devices are designed to be compact and operate as fast as possible with low overhead. What is needed is a way to modify the structure of a mobile device platform in order to better monitor application performance on the mobile device

What is needed is an improved method for informing an administrator of the performance of an application managed by the administrator.

SUMMARY

The present technology allows for a mobile device operating system to be modified in order to better monitor the performance of the mobile device applications. A mobile device file, such as a dex file for android operating system, may be extracted from an APK file for an application. At runtime, using hooks introduced at compile time instrumentation, the agent is able to load classes dynamically from the generated dex file. The mobile device file may be analyzed, and a new mobile device file may be generated in place of the analyzed mobile device file. The modifications may include identifying methods that should be monitored during execution of the corresponding application on a mobile device. The mobile device file, such as a dex file, may be modified at a remote server, provided back to the mobile device, and then loaded by the mobile device at a later time.

An embodiment may include a method for monitoring an application. The method may be being with receiving information regarding methods to monitor. A new mobile device file may be generated, wherein the methods to be monitored encompassed in a sub-class in the new mobile device file. The new mobile device file may be provided to the mobile device, the new mobile device file loaded and instantiated at the mobile device.

An embodiment may include a system for monitoring a business transaction. The system may include a processor, a memory and one or more modules stored in memory and executable by the processor. When executed, the one or more modules may receive information regarding methods to monitor, generate new mobile device file, the methods to be monitored encompassed in a sub-class in the new mobile device file, and provide the new mobile device file to the mobile device, the new mobile device file loaded and instantiated at the mobile device.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of a system for monitoring a mobile device application.

FIG. 2 is a method for modifying a mobile device operating system.

FIG. 3 is a method for defining information points within a mobile device file.

FIG. 4 is a method for generating a new dex file.

FIG. 5 is a method for loading a dex file onto a mobile device.

FIG. 6 is a block diagram of a computing environment for implementing the present technology.

DETAILED DESCRIPTION

The present technology allows for a mobile device operating system to be modified in order to better monitor the performance of the mobile device applications. A mobile device file, such as a dex file for android operating system, may be extracted from an APK file for an application. The mobile device file may be analyzed, and a new mobile device file may be generated in addition to the analyzed mobile device file. The modifications may include identifying methods that should be monitored during execution of the corresponding application on a mobile device. The mobile device file, such as a dex file, may be generated at a remote server, provided back to the mobile device, and then loaded by the mobile device at a later time.

FIG. 1 is a block diagram of a system for monitoring a mobile device application. The system of FIG. 1 includes mobile device 110, network 120, application store 130, and server 140. Mobile device 110 may download an application from mobile device store 130 over network 120 and execute the application. The mobile device application may include an APK file which may include other mobile device files. If the mobile device has an Android operating system, the additional mobile device files may include a dex file.

To monitor a mobile device application, the application APK file is instrumented at compile time such that new classes generated by application 145 can be loaded at runtime. Thus, once an APK file 117 is published by the developer to the mobile device store, the APK file may be uploaded to server 140. An application 145 at server 140 may allow a user to define information points at which the mobile device operating system can be monitored. The information points may correspond to one or more threads, objects, methods, or other elements of the operating system to monitor during operation of the mobile device. Application 145 may receive the information point system, generate one or more new mobile application files, such as a dex file, generate a new APK file with the updated mobile application files, and provide the updated APK file to mobile device 110.

FIG. 2 is a method for configuring a mobile device operating system to be monitored. First, an APK file is received, for example from the developer of the application, by the remote server at step 210. The APK file may be received from the mobile device upon a new release or the initial purchase for acquisition of the application. Metadata may be extracted for methods and classes contained in the received APK file at step 220. The metadata may include information on methods and classes suitable to be modified with a sub-class (i.e., wrapper).

Information points may be defined at step 230. The information points may include one or more methods, threads, or other elements of the APK file suitable to be monitored during execution of the APK file on the mobile device. More details for defining information points is discussed in more detail below with respect to the method of FIG. 3.

A new dex file with additional information points is generated at step 240. The new dex file is generated from the information points defined at step 230. The new dex file may include information points already included in the APK file plus those defined at step 30. Generating a new dex file is discussed in more detail with respect to the method of FIG. 4.

A poll may be received from an agent on the mobile device at step 250. The poll may be regarding any information point changes made to the APK. Upon receiving the poll, a new dex configuration may be transmitted to the android device agent at step 260. In some instances, in response to the poll, the server may transmit information to the mobile device to indicate the presence of a newly generated dex file to the agent. The new dex file may be transmitted to the agent in response to the mobile device's confirmation or receipt of the information.

The dex file may be stored at the android mobile device at step 270. The agent on a mobile device then may set a flag to indicate that new information points are enabled and that the new dex file should be loaded upon the next application restart at step 290.

FIG. 3 is a method for defining information points. The method of FIG. 3 provides more detail for step 230 of the method of FIG. 2. First, a user interface is provided to a user at step 310. Information points already present in the uploaded dex file are then displayed in the user interface at step 320. Input may then be received through the user interface for additional information points at step 330. The additional information points relate to methods and threads that should be monitored moving forward. The additional information regarding the information points is then stored at step 340.

FIG. 4 provides a method for generating a new dex file. Once the information points have been defined, for each class, an application on server 140 may iterate through methods requested by a user at step 410. Methods may then be generated in a subclass that intercepts all invocations of the particular information point at step 420. Generated subclasses are then written into the dex file at step 430.

Once the new dex file has been received by the mobile device, the dex file may be loaded. The method of FIG. 5 provides more detail for loading a dex file. The mobile device operating system may be started at step 510. In some instances, the mobile device operating system may be an android operating system. A Boolean flag is checked to determine if a new dex file should be loaded at startup at step 520. If the Boolean flag is turned on, the dex file is then loaded with the generated subclasses at step 530. The classes are then dynamically loaded from the dex file and instantiated at step 540.

FIG. 6 is a block diagram of a computing environment for use with the present technology. System 600 of FIG. 6 may be implemented in the contexts of the likes of client 110, application store 130 and server 140. FIG. 6 is intended as a general description for exemplary purposes only. A system similar to that in FIG. 6 may be used to implement mobile device 115, but may include additional components such as an antenna, additional microphones, and other components typically found in mobile devices such as a smart phone or tablet computer.

The computing system 600 of FIG. 6 includes one or more processors 610 and memory 620. Main memory 620 stores, in part, instructions and data for execution by processor 610. Main memory 620 can store the executable code when in operation. The system 600 of FIG. 6 further includes a mass storage device 630, portable storage medium drive(s) 640, output devices 650, user input devices 660, a graphics display 670, and peripheral devices 680.

The components shown in FIG. 6 are depicted as being connected via a single bus 690. However, the components may be connected through one or more data transport means. For example, processor unit 610 and main memory 620 may be connected via a local microprocessor bus, and the mass storage device 630, peripheral device(s) 680, portable storage device 640, and display system 670 may be connected via one or more input/output (I/O) buses.

Mass storage device 630, which may be implemented with a magnetic disk drive or an optical disk drive, is a non-volatile storage device for storing data and instructions for use by processor unit 610. Mass storage device 630 can store the system software for implementing embodiments of the present invention for purposes of loading that software into main memory 610.

Portable storage device 640 operates in conjunction with a portable non-volatile storage medium, such as a floppy disk, compact disk or Digital video disc, to input and output data and code to and from the computer system 600 of FIG. 6. The system software for implementing embodiments of the present invention may be stored on such a portable medium and input to the computer system 600 via the portable storage device 640.

Input devices 660 provide a portion of a user interface. Input devices 660 may include an alpha-numeric keypad, such as a keyboard, for inputting alpha-numeric and other information, or a pointing device, such as a mouse, a trackball, stylus, or cursor direction keys. Additionally, the system 600 as shown in FIG. 6 includes output devices 650. Examples of suitable output devices include speakers, printers, network interfaces, and monitors.

Display system 670 may include an LED, liquid crystal display (LCD) or other suitable display device. Display system 670 receives textual and graphical information, and processes the information for output to the display device.

Peripherals 680 may include any type of computer support device to add additional functionality to the computer system. For example, peripheral device(s) 680 may include a modem or a router.

The components contained in the computer system 600 of FIG. 6 are those typically found in computer systems that may be suitable for use with embodiments of the present invention and are intended to represent a broad category of such computer components that are well known in the art. Thus, the computer system 600 of FIG. 6 can be a personal computer, hand held computing device, telephone, mobile computing device, workstation, server, minicomputer, mainframe computer, or any other computing device. The computer can also include different bus configurations, networked platforms, multi-processor platforms, etc. Various operating systems can be used including Unix, Linux, Windows, Macintosh OS, Palm OS, and other suitable operating systems.

When implementing a mobile device such as smart phone or tablet computer, the computer system 600 of FIG. 6 may include one or more antennas, radios, and other circuitry for communicating over wireless signals, such as for example communication using Wi-Fi, cellular, or other wireless signals.

The foregoing detailed description of the technology herein has been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the technology to the precise form disclosed. Many modifications and variations are possible in light of the above teaching. The described embodiments were chosen in order to best explain the principles of the technology and its practical application to thereby enable others skilled in the art to best utilize the technology in various embodiments and with various modifications as are suited to the particular use contemplated. It is intended that the scope of the technology be defined by the claims appended hereto. 

What is claimed is:
 1. A method for monitoring a mobile application, comprising: receiving information regarding methods to monitor for an application; generating new mobile device file, the methods to be monitored encompassed in a sub-class in the new mobile device file; and providing the new mobile device file to the mobile device, the new mobile device file loaded and instantiated at the mobile device.
 2. The method of claim 1, wherein the new mobile device file is a dex file for an android operating system.
 3. The method of claim 1, wherein identification of one or more methods to monitor is received through a UI from a user
 4. The method of claim 3, wherein generating the new mobile device file includes wrapping the methods to be monitored within a subclass wrapper
 5. The method of claim 1, further comprising receiving a prior mobile device file with meta data for mobile device operating system methods, the new dex file including monitored methods that are specified to be monitored in the prior mobile device file
 6. The method of claim 1, further comprising: receiving an APK file; and extracting method information from the APK file.
 7. The method of claim 1, further comprising transmitting the new mobile device file to an agent at the mobile device in response to a poll from the agent.
 8. The method of claim 7, wherein the agent sets a flag to load the new mobile device file upon the next mobile device restart.
 9. A non-transitory computer readable storage medium having embodied thereon a program, the program being executable by a processor to perform a method for monitoring a mobile application, the method comprising: receiving information regarding methods to monitor in an application; generating new mobile device file, the methods to be monitored encompassed in a sub-class in the new mobile device file; and providing the new mobile device file to the mobile device, the new mobile device file loaded and instantiated at the mobile device.
 10. The non-transitory computer readable storage medium of claim 9, wherein the new mobile device file is a dex file for an android operating system.
 11. The non-transitory computer readable storage medium of claim 9, wherein identification of one or more methods to monitor is received through a UI from a user
 12. The non-transitory computer readable storage medium of claim 11, wherein generating the new mobile device file includes wrapping the methods to be monitored within a subclass wrapper
 13. The non-transitory computer readable storage medium of claim 9, the method further comprising receiving a prior mobile device file with meta data for mobile device operating system methods, the new dex file including monitored methods that are specified to be monitored in the prior mobile device file
 14. The non-transitory computer readable storage medium of claim 9, the method further comprising: receiving an APK file; and extracting method information from the APK file.
 15. The non-transitory computer readable storage medium of claim 9, the method further comprising transmitting the new mobile device file to an agent at the mobile device in response to a poll from the agent.
 16. The non-transitory computer readable storage medium of claim 15, wherein the agent sets a flag to load the new mobile device file upon the next mobile device restart.
 17. A system for monitoring a mobile application, comprising: a processor; a memory; and one or more modules stored in memory and executable by a processor to receive information regarding methods to monitor in an application, generate new mobile device file, the methods to be monitored encompassed in a sub-class in the new mobile device file, and provide the new mobile device file to the mobile device, the new mobile device file loaded and instantiated at the mobile device.
 18. The system of claim 17, wherein the new mobile device file is a dex file for an android operating system.
 19. The system of claim 17, wherein identification of one or more methods to monitor is received through a UI from a user
 20. The system of claim 19, wherein generating the new mobile device file includes wrapping the methods to be monitored within a subclass wrapper
 21. The system of claim 17, one or more modules further executable to receive a prior mobile device file with meta data for mobile device operating system methods, the new dex file including monitored methods that are specified to be monitored in the prior mobile device file
 22. The system of claim 17, the one or more modules further executable to receive an APK file and extract method information from the APK file.
 23. The system of claim 17, the one or more modules further executable to transmit the new mobile device file to an agent at the mobile device in response to a poll from the agent.
 24. The system of claim 23, wherein the agent sets a flag to load the new mobile device file upon the next mobile device restart. 